<template>
	<view>
		<div class="tupian" style="width: 150rpx;margin: 20px auto;">
			
			<u--image  :showLoading="true" style="margin: 0 auto;"   :src="list.headimg" 
			width="150rpx" height="150rpx" ></u--image>
		</div>
		<view class="boxtext">
			<text>用户名称</text>
			<input class="wenben" disabled type="text" v-model="list.supername">
		</view>
		<view class="boxtel">
			<text>手机号码</text>
			<input class="wenben" disabled type="text" v-model="list.tel">
		</view>
		<view class="boxtel">
			<text>工作邮箱</text>
			<input class="wenben" disabled type="text" v-model="list.email">
		</view>
		<view class="boxtel">
			<text>余额</text>
			<input style="color: red;" class="wenben" disabled type="text" v-model="list.balance">
		</view>
		
		<button type="text" @click="open">更新信息</button>
		
		<view class="index">
			<view class="cell" style="border-top:1px solid #ccc ;" @click="topage('conment')">
				<view class="cell-left">
					<text class="cell-text">联系我们</text>
				</view>
			</view>
			<!--  -->
			<view class="cell" @click="topage('helpment')">
				<view class="cell-left">
					<text class="cell-text">使用帮助</text>
				</view>
			</view>
			<view class="cell" @click="topage('abtment')">
				<view class="cell-left">
					<text class="cell-text">关于我们</text>
				</view>
			</view>
			<view class="cell" @click="open_EDIT_PASS()">
				<view class="cell-left">
					<text class="cell-text">修改密码</text>
				</view>
			</view>	
			
			
		</view>
		<view class="logout">
			<button type="warn" @click="logout">退出登录</button>
		</view>
		
	</view>


</template>

<script>
	import { Request2 } from '@/until/api.js';
export default {
	data() {
	    return {
			list:{},
	   //    input: '烧猫',
		  // input1: '13925491619',
		  // input2: 'wadugg@sina.com',
		  // squareUrl: "https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png",
	    }
	  },
	  onLoad() {
		  this.getdata();
	  },
	methods: {
		async getdata(){
			var requsetdata={
				account:uni.getStorageSync('account')
			}
			var account = uni.getStorageSync('account')
			
			
			var res= await Request2('/super/pergetdata','post', requsetdata);
			
			this.list = res.data[0]
		},
      open() {
		var account = uni.getStorageSync('account')
		
		  uni.navigateTo({
			  url:'/pages/public/correct?account='+account
		  })
      },
	  open_EDIT_PASS() {
	  		var account = uni.getStorageSync('account')
	  		
	  		  uni.navigateTo({
	  			  url:'/pages/public/passwordEDIT?account='+account
	  		  })
	  },
	  topage(e){
	  	uni.navigateTo({
	  		url:'/pages/public/'+e
	  	})
	  },
	  logout(){
	  	this.Loginout();
	  }
    },
	
  }
</script>

<style>
	.tupian{
		text-align: center;
	}
	text{
		font-family: 'Courier New';
		font-size: 130%;
		font-weight: 800;
		margin:auto 0;
		margin-left: 5px;
	}
	.boxtext{
		height: 50px;
		display: flex;
		border-top: 1px solid #ccc;
		border-bottom: 1px solid #ccc;
	}
	.boxtel{
		height: 50px;
		display: flex;
		border-bottom: 1px solid #ccc;
	}
		
	.wenben{
		margin-top: 15px;
		margin-left: 65px;
		color: #d3d3d3;
	}
	
	.index {
		display: flex;
		flex-direction: column;
		width: 100%;
		background-color: #f8f8f8;
		margin-top: 30px;
		border-top-left-radius: 20px;
		border-top-right-radius: 20px;
	}
	
	.cell {
		display: flex;
		align-items: center;
		border-bottom: 1px solid #ccc;
		height: 90upx;
		justify-content: space-between; 
	}
	
	.cell:active {
		background-color: #333;
		color: white;
		box-shadow: 1upx 1upx 35upx #ccc;
	}
	
	.cell-left {
		/* display: flex;
		align-items: center;
		margin-left: 65upx; */
	}
	
	.cell-right {
		margin-right: 45upx;
		height: 28upx;
	}
	
	.right-arrow {
		color: #aaa;
		width: 15upx;
		height: 28upx;
	}
	
	.cell_icon {
		width: 40upx;
		height: 40upx;
	}
	/* .cell-text {
		margin-left: 25upx;
	} */
</style>
